<script>
  let arr = [1, 2, 3, 4, 5, 6, 8, 10]
  let arrEven = arr.reduce((result, item) => {
    if (item % 2 === 0) {
      result.push(item)
      return result
    }
    return result
  }, [])
  console.log(arrEven)
</script>
